<?php

namespace IDock\Insurance\DAJIA\Request;

use IDock\Http\Request;
use IDock\Http\RequestFormat;
use IDock\Http\RequestMethod;
use IDock\Http\Response;

/**
 * 大家请求总类
 */
class AllDAJIARequest extends Request {

    protected $code;

    protected $method = RequestMethod::POST;

    protected $format = RequestFormat::FORM;

    public function loadConfig(array $config): Request
    {
        $this->gateway = $config['gateway'] ?? '';

        $this->logsDir = $config['logsDir'] ?? '';

        $this->timeout = $config['timeout'] ?? '';

        $this->format = RequestFormat::JSON;

        return  $this;
    }

    /**
     * @return mixed
     */
    public function getCode()
    {
        return $this->code;
    }
}